home *** CD-ROM | disk | FTP | other *** search
- Path: news.cs.ucla.edu!not-for-mail
- From: jlz@pelican.cs.ucla.edu (Jian Zhen)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: help with a simple c routine
- Followup-To: poster
- Date: 11 Apr 1996 13:34:38 -0700
- Organization: UCLA CS Dept
- Message-ID: <4kjqcu$794@pelican.cs.ucla.edu>
- References: <4kin72$ns5@pelican.cs.ucla.edu>
- NNTP-Posting-Host: pelican.cs.ucla.edu
-
- Hi all
-
- I am trying to write a simple c routine that gets rid of all the .. or .
- in dir paths like somehting/../.. or somedir/./something type
-
- so let's say I ahve the follwoing paths
-
- /home/jlz/../jlz
-
- after parsing it I should have
-
- /home/jlz
-
- or
-
- /home/./jlz
-
- it becomes
-
- /home/jlz
-
- I can't think of an easy way of doing this. Please help!
-
- thanks very much
-
- email me if possible.
-
- Jian
-
-
-
- --
- +---------------------------------------------------------------------------+
- | Jian Liang Zhen | Home : 1.310.915.5135 | 3325 S. Sepulveda BLVD. |
- | jlz@cs.ucla.edu | Lab (BH 3811): 1.310.825.0360 | Apt 6. LA. CA. 90034 |
- |___________/---------- http://pack.cs.ucla.edu:2909/ ----------\___________|
-
-
- --
- +---------------------------------------------------------------------------+
- | Jian Liang Zhen | Home : 1.310.915.5135 | 3325 S. Sepulveda BLVD. |
- | jlz@cs.ucla.edu | Lab (BH 3811): 1.310.825.0360 | Apt 6. LA. CA. 90034 |
- |___________/---------- http://pack.cs.ucla.edu:2909/ ----------\___________|
-